<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    var arr = function (candidates) {
      let ans = 0
      for (let i = 0; i < 30; i++) {
        let cnt = 0
        for (let num of candidates) {
          if (num & (1 << i)) {
            cnt++
          }
        }
        ans = Math.max(ans, cnt)
      }
      return ans
    };
    console.log(arr(candidates = [16, 17, 71, 62, 12, 24, 14]));
  </script>
</body>

</html>